/**
	@author Manh Cuong
	@param
    @desc : define memory space for compiler and target.
 */

/* platform std type */
#include "stm32f10x.h"
/* Implements requirement */
#ifndef COMPILER_H
#define COMPILER_H



/* implementation of redefinaion  */
#ifndef true
    #define __TRUE 1
#else
    #define __TRUE true
#endif
#ifndef false
    #define __FALSE 0
#else
    #define __FALSE false
#endif


#ifndef NFC_CODE
    #define NFC_CODE
#endif
/* implementation of Compiler.h */

/*****************************************************************************/
/* DEFINITION OF MACROS (for variables)                                      */
/*****************************************************************************/
/* Implements variables requirement  */
#define VAR(vartype, memclass) vartype memclass

/*****************************************************************************/
/* DEFINITION OF MACROS (Definitions)                                        */
/*****************************************************************************/
/* Implements AUTOMATIC requirement  */
#define AUTOMATIC  
/* Implements TYPEDEF requirement */
#define TYPEDEF
/* Implements NULL pointer requirement */
#define NULL_PTR     ((void *)0)
/* Implements INLINE requirement  */
#define INLINE       
/* Implements local static requirement  */
#define LOCAL_INLINE static

#define _STATIC_     STATIC
#define STATIC       static


/*****************************************************************************/
/* DEFINITION OF MACROS (for functions)                                      */
/*****************************************************************************/

/* Implements function requirement  */
#define FUNC(rettype, memclass) rettype memclass


/*****************************************************************************/
/* DEFINITION OF MACROS (for pointers)                                       */
/*****************************************************************************/

/* Implements pointer to var requirement  */
#define P2VAR(ptrtype, memclass, ptrclass) ptrtype memclass * ptrclass
/* Implements pointer to const requirement  */
#define P2CONST(ptrtype, memclass, ptrclass) const ptrtype memclass * ptrclass
/* Implements const pointer to var  requirement  */
#define CONSTP2VAR(ptrtype, memclass, ptrclass) \
                     ptrtype memclass * const ptrclass
/* Implements const pointer to const requirement  */
#define CONSTP2CONST(ptrtype, memclass, ptrclass) \
                     const ptrtype memclass * const ptrclass
/* Implements pointer function requirement  */
#define P2FUNC(rettype, ptrclass, fctname) rettype (*ptrclass fctname)


/*****************************************************************************/
/* DEFINITION OF MACROS (for constants)                                      */
/*****************************************************************************/
/* Implements const requirement  */
#define CONST(consttype, memclass) const consttype memclass

#endif /* COMPILER_H */
